package ae.pcfc.etks.online.itworx.ehs.web.enums;

import java.util.HashMap;
import java.util.Map;


public enum RequestStatus {
	
	Closed("Closed"),
	Return_For_Update("Return_For_Update"),
	Submitted("Submitted"),
	Resubmitted("Resubmitted"),
	IMS_Non_Compliant_Comments("IMS_Non_Compliant_Comments"),
	Rejected("Rejected"),
	Canceled("Canceled"),
	Payment_Done("Payment_Done"),
	Payment_Confirmed("Payment_Confirmed"),
	Inspection_In_Progress("Inspection_In_Progress"),
	Re_Inspection_Required("Re_Inspection_Required"),
	Inspection_Approved("Inspection_Approved"),
	Non_Compliance_Comments_Exists("Non_Compliance_Comments_Exists"),
	Comments_Replied("Comments_Replied"),
	Additional_Payment_Done("Additional_Payment_Done"),
	Approved("Approved"),
	Additional_Payment_Required("Additional_Payment_Required");
	
	private String statusName;
	
	private static Map<String, RequestStatus> statusMap = new HashMap<String, RequestStatus>();
	static {	
		statusMap.put(Rejected.getStatusName(), RequestStatus.Rejected);
		statusMap.put(Canceled.getStatusName(), RequestStatus.Canceled);
		statusMap.put(Closed.getStatusName(), RequestStatus.Closed);
		statusMap.put(Submitted.getStatusName(), RequestStatus.Submitted);
		statusMap.put(Resubmitted.getStatusName(), RequestStatus.Resubmitted);
		statusMap.put(Return_For_Update.getStatusName(), RequestStatus.Return_For_Update);
		statusMap.put(Inspection_Approved.getStatusName(), RequestStatus.Inspection_Approved);
		statusMap.put(Comments_Replied.getStatusName(), RequestStatus.Comments_Replied);
		statusMap.put(Inspection_In_Progress.getStatusName(), RequestStatus.Inspection_In_Progress);
		statusMap.put(Additional_Payment_Done.getStatusName(), RequestStatus.Additional_Payment_Done);
		statusMap.put(IMS_Non_Compliant_Comments.getStatusName(), RequestStatus.IMS_Non_Compliant_Comments);
		statusMap.put(Payment_Done.getStatusName(), RequestStatus.Payment_Done);
		statusMap.put(Payment_Confirmed.getStatusName(), RequestStatus.Payment_Confirmed);
		statusMap.put(Re_Inspection_Required.getStatusName(), RequestStatus.Re_Inspection_Required);
		statusMap.put(Non_Compliance_Comments_Exists.getStatusName(), RequestStatus.Non_Compliance_Comments_Exists);
		statusMap.put(Approved.getStatusName(), RequestStatus.Approved);
		statusMap.put(Additional_Payment_Required.getStatusName(), RequestStatus.Additional_Payment_Required);
	}
	
	public String getStatusName() {
		return statusName;
	}

	private RequestStatus(String statusName) {
		this.statusName = statusName;
	}
	
	public static RequestStatus getStatus(String name){
		return statusMap.get(name);
	}
}
